home *** CD-ROM | disk | FTP | other *** search
- /* atan.c, FUNCTION FROM PAGE 198 C BIBLE */
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h> /* errno is definde here */
- #define R_TO_D 57.29578 /* radian to degrees */
- main()
- {
- double tanvalue, result;
- printf("Enter value whose arctangent you want to evaluate: ");
- scanf("%le", &tanvalue);
- result = atan(tanvalue) * R_TO_D;
- if(errno != EDOM)
- {
- rintf(" Arc tangent (%F) = %f deg.\n", tanvalue, result);
- }
- }